Wiki Tutorial/Create Tabs
Guides and Tutorials =How to Create a Tabbed Page= Tabbed pages are very useful, but they can be intimidating to new editors, particularly if you are unfamiliar with source code. Some quests will have different text and different results, but they have the same name. So what can we do? And how can we present the information in an easy-to-find way? Tabbed pages, that's how! There are many reasons why the text of a quest might be different for different people; generally this is related to your fealty or your background (and sometimes the alignment choices you made earlier in the storyline). This section of the tutorial will go over a few of the possible differences and give you a rundown of what to do. If you are ever in doubt about how to do this or are uncomfortable with your ability to do this, but want to create the page so the info is there, go ahead and do it! Send one of the admin or gnomes a note; we can always finish up for you! Base Pages and Sub-Pages For the purposes of this tutorial, I'm going to use two terms: base page and sub-page. The base page shares its name with the actual quest (for instance, Sharp as the Difference). The sub-pages are actually entirely different pages on the Wiki which are linked up to the base page. They share their name with the base page (with a modifier) but contain information specific to a certain background, fealty, alignment choice, or even your character's gender. In this example, our sub-pages's modifier is your character's background: Sharp as the Difference/Merchant or Sharp as the Difference/Hedge Knight. The Template As you know, at the top of every Wiki page is an Edit button. By clicking it, you're allowed to edit the page with changes and updates. The Edit button automatically appears at the top of every page; you don't need to do anything to get it to show up. However, when you're creating a page within a tab, that Edit button doesn't exist. It would exist if you were viewing the actual source material for that tab, but when you're looking at it through a tab, it's not there. This is the single most confusing thing for editors to the Wiki. You click edit -- but what you're wanting to edit isn't even there. Behold the template. This adds an Edit button to your page, wherever you put the code. In the image above, I have circled two Edit buttons, one in red and one in green. The red button is the always-there Edit button that appears at the top of every page. The green button is the one added with the template. In this example, clicking the green Edit button will allow you to edit the text on the Highborn Bastard sub-page (the page that is pooled when you click on the Highborn Bastard tab). If you clicked the red Edit button, you'll see some header details, followed by this: Sharp as the Difference/Former Mercenary|Former Mercenary Sharp as the Difference/Fosterling|Fosterling Sharp as the Difference/Hedge Knight|Hedge Knight Sharp as the Difference/Highborn Bastard|Highborn Bastard Sharp as the Difference/Merchant|Merchant Sharp as the Difference/Minor Noble by Marriage|Minor Noble by Marriage Sharp as the Difference/Whisperer|Whisperer See why people get so confused? They click Edit, but all they get is that code! But if you click the green Edit button, you'll find the actual quest that you're trying to edit. In part, it will look like this: __NOEDITSECTION__ Notice the template at the end of that first line. That's how the green Edit button came into existence, so remember to add that template on your tabbed pages! When to Create Tabbed Pages There are essentially two different reasons you would need to add a tabbed page. 1. You received a quest with the same title as the one on the Wiki, but all of the text is different. 2. You received a quest with the same title as the one on the Wiki, but only part of the text is different (such as the introductory text, the various options, or the results -- but not all of them). The general premise is the same for each of them, but where you add the tabs and what you put on the base page will vary, depending on the type of quest (city, sworn sword, or boss) and how much of the quest is different. Separate tutorials have been created for each type of quest: Same quest name, entirely different text An example of this scenario would be A Private Moment which, you will note, has tabs under the edit button and above the actual title and menu bar. One is for "Other Fealties" and one is for "Lannister." Clicking between the tabs will change everything on the page. In order to add the new quest information, we are going to create two new sub-pages and edit our original base page so it can pull the info from those new pages. Head over to Create a New Page; this one is a city quest. The name you want to give the quest is exactly what it is in the game, followed by a forward slash -- /''' -- and a more specific name that explains the difference between the choices. In A Private Moment, the two sub-pages are actually called A Private Moment/Unallocated and A Private Moment/Lannister. Make sure you don't put spaces around the slash (like "A Private Moment / Lannister"); mash those things together! For the purposes of this tutorial, assume you are sworn to House Lannister and have just discovered that your quest looks totally different (yet has the same name). When you enter the page title on Create a New Page, it will be called "A Private Moment/Lannister" because you are a Lannister. Fill out all of the info, just like you're making a brand new quest. After the __NOEDITSECTION__ text at the very top of the page, type . This will create that greed Edit button and allow you to edit that page while you're looking at it on A Private Moment. Now click Edit on the original quest "A Private Moment." Highlight all of the text on the page, copy it to your clipboard, then hit the back button. We need to create a new page containing all of that text you just copied. In the upper right corner of your screen, you should see a button with a drop-down arrow that says "Contribute." Click it and pick "Add a Page." (I don't recommend using this when you're creating a new page from scratch; it doesn't contain any of the templates, which have the fancy layout and auto categorization built-in. But since you just copied everything from the old quest, all of that info is there and it's okay to create a new page this way.) The default layout is Standard; you can keep that and just delete all the text that shows up, or switch the layout to Blank before you hit create. Now you have to name the page. Well, in our example, the reason you had to create a new page is because yours was fealty-specific. So name your new page "A Private Moment/Unallocated" or "A Private Moment/Other Fealties" -- something to imply it's for everyone else but Lannisters. I usually pick Unallocated, simply because it's shorter. Paste everything from the old quest into your new page. Then, just like before, add the template to the end of the first line, which contains the __NOEDITSECTION__ text. Click publish. Just for safety's sake, double check that your Unallocated and Lannister pages look right. Unallocated should be identical to "A Private Moment" -- but not for long! If everything is right, go ahead and edit "A Private Moment." Erase everything. Yes, all of it! You just created two new pages with all of that info (Unallocated being exactly the same as what you're erasing) so we don't need it. We do, however, need tabs. Now you have a blank canvas in "A Private Moment." Type in this code: A Private Moment/Unallocated|Other Fealties A Private Moment/Lannister|Lannister That is the page's name on the Wiki (A Private Moment/Unallocated), followed by a vertical bar -- '''| -- and what you want the tab to say. So the first tab will be called Other Fealties instead of Unallocated (since that makes more sense to people) and the second tab will be called Lannister. Preview it. What you should see are two tabs, one named Other Fealties and one named Lannister. The information when you have one particular tab selected is exactly what you just created in those two new pages. Assuming it does, hit publish. You're done! You don't need to change anything on the storyline page because this quest is already there, just with tabs. Same quest name, same intro text, different options and/or results An example of this scenario is A Woman Grown, where the options and results are based on your character's gender. We're going to create new pages for tabs, just like we did in the prior example, but we're not going to copy over all of the information. Instead of creating a new quest from Create a New Page, you only need a certain part of it -- in this case, the options and results. So you can use the "Contribute" button and name your quest "A Woman Grown/Male". Copy only the relevant portions from the original page (options and results). In that particular quest, what had been posted were the male options and results, so I created a new page for Male and pasted only those parts into it. Once again, at the very top of the page -- before any other text -- type the template . Now you can hit publish. It'll look like this: Press "Contribute" again, name your new quest "A Woman Grown/Female", and add that info. (My tip: if you already created the page for the original text, you can just hit paste again, erase the different parts and rewrite the changes. No need to remember precisely how to write the template info.) Don't forget the template at the top! This time, it'll look like this: With your Male and Female pages published and looking good (although a bit naked, since you only copied a couple of sections and not the whole page), edit the original "A Woman Grown" page and erase only the info you just copied. (If that was options and results, but not the navigation, only erase those parts. If you copied everything from the page from options on, you can erase all of it because it will show up on those new Male and Female pages.) And much like the last time, type the following coding where you deleted the text: A Woman Grown/Male|Your Character is Male A Woman Grown/Female|Your Character is Female This will generate tabs called "Your Character is Male" and "Your Character is Female" so users can choose the one that relates to them. Preview the page; you should see tabs in the Options section now, not at the top of the page. Everything you added to the Male and Female pages are there when you select those tabs. If it's good, hit publish. Again, no need to change the Storyline page. It's the same quest, and anyone who clicks on it will be able to see the tabs. If you want to see an example of differing intro text and options, but identical result text, check out To Braavos. As you can see, tabbed pages are useful in a variety of settings, but they can also be very confusing to editors. Hopefully this will help you better understand their coding! Category:Guides and Tutorials